//package cn.amarone.scaffold.config.global;
//
//import com.github.xiaoymin.knife4j.spring.extension.OpenApiExtensionResolver;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import springfox.documentation.builders.ApiInfoBuilder;
//import springfox.documentation.builders.PathSelectors;
//import springfox.documentation.builders.RequestHandlerSelectors;
//import springfox.documentation.service.ApiInfo;
//import springfox.documentation.service.Contact;
//import springfox.documentation.spi.DocumentationType;
//import springfox.documentation.spring.web.plugins.Docket;
//import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
//
///**
// * @author Amarone
// * @version 1.0
// * @description:
// * @date 2023/8/28 15:21
// */
//@Configuration
//public class SwaggerConfiguration {
//
//    private final OpenApiExtensionResolver openApiExtensionResolver;
//
//    @Autowired
//    public SwaggerConfiguration(OpenApiExtensionResolver openApiExtensionResolver) {
//        this.openApiExtensionResolver = openApiExtensionResolver;
//    }
//
//    @Bean(value = "defaultApi2")
//    public Docket defaultApi2() {
//        String groupName = "2.X版本";
//        Docket docket = new Docket(DocumentationType.SWAGGER_2)
//                .host("https://www.baidu.com")
//                .apiInfo(apiInfo())
//                .groupName(groupName)
//                .select()
//                .apis(RequestHandlerSelectors.basePackage("cn.amarone.scaffold"))
//                .paths(PathSelectors.any())
//                .build()
//                .extensions(openApiExtensionResolver.buildExtensions(groupName));
//        return docket;
//    }
//
//    private ApiInfo apiInfo() {
//        return new ApiInfoBuilder()
//                .title("Scaffold Project API Document")
//                .description("Scaffold Project API Document")
//                .contact(new Contact("amarone", "zjlgd.cn", "amaronehome@outlook.com"))
//                .version("1.0")
//                .build();
//    }
//}
